package com.oak.consul;


import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

@SpringBootApplication
@EnableDiscoveryClient
@RestController
public class Consul8011Application {

    public static void main(String[] args) {
        SpringApplication.run(Consul8011Application.class, args);
    }

    @RequestMapping("/order")
    public String order() {
        return StrUtil.format("订单获取成功：{}，时间：{}",UUID.randomUUID(), DateUtil.now());
    }
}
